1 /*
2 * Title: S/MIME Project
3 * Description: S/MIME email sending capabilities
4 * @Author Vladimir Radisic
5 * @Version 2.0.1
6 */
7
8
9 package org.webdocwf.util.smime.cms;
10
11
12 import org.webdocwf.util.smime.crypto.SigningProcessor;
13 import org.webdocwf.util.smime.exception.SMIMEException;
14 import org.webdocwf.util.smime.der.DEROctetString;
15 import java.security.PrivateKey;
16
17
18 /***
19 * SignatureValue class is DER encoded octet string for holding signature
20 * values represented in ASN.1 notation according to RFC2630.<BR>
21 * <BR>
22 * SignatureValue ::= OCTET STRING<BR>
23 */
24 public class SignatureValue extends DEROctetString {
25
26 /***
27 * For creating signature values necessary information are: data for signing as byte
28 * array, type of signing algorithm, and private key for performing of asymmetric
29 * encryption.
30 * @param forSigning0 information for signing
31 * @param key0 private key (DSA or RSA depend on type of signing)
32 * @param signAlg0 type of signing algorithm (can be SHA1_WITH_RSA, MD2_WITH_RSA,
33 * MD5_WITH_RSA or SHA1_WITH_DSA).
34 * @exception SMIMEException thrown in super class constructor.
35 */
36 public SignatureValue(byte[] forSigning0, PrivateKey key0, String signAlg0) throws SMIMEException {
37 super(SigningProcessor.getSignature(forSigning0, key0, signAlg0));
38 }
39 }
40
This page was automatically generated by Maven